<!-- $Id: listComment.html 113 2011-05-10 10:03:34Z nicholasinlove1986@gmail.com $ -->
<include file="Public:pageheader"/>
<load href="__PUBLIC__/Js/domTT/domLib.js" />
<load href="__PUBLIC__/Js/domTT/fadomatic.js" />
<load href="__PUBLIC__/Js/domTT/domTT.js" />
<script type="text/javascript">
function sortBy(order,sort){
	location.href = "?order="+order+"&sort="+sort;
}
</script>
<div class="form-div">
  <form action="__URL__/listComment" name="searchForm" method="post">
    <img src="__PUBLIC__/Images/icon_search.gif" width="26" height="22" border="0" alt="search" />
	<select name="map" >
	<option value="">{$Think.lang.please_select}</option>
	<option value="visible">{$Think.lang.unvisible}</option>
	<option value="remark">{$Think.lang.unremark}</option>
	<option value="approved">{$Think.lang.unapproved}</option>
    </select>
    {$Think.lang.search_comment} <input type="text" name="keyword" /> <input type="submit" class="Button" value=" {$Think.lang.search} " />
  </form>
</div>

<form method="POST" action="__URL__/batchComment" name="listForm" onsubmit="return confirmSubmit_(this)">
<!-- start comment list -->
  <div class="list-div" id="listDiv">
    <table cellpadding="3" cellspacing="1">
      <tbody>
        <tr>
          <th><input type="checkbox" id="chkOpenAll" onclick="openAll(this)" />
            <a href="javascript:void(0)" onclick="javascript:sortBy('comment_id','<if condition="$sort eq asc_comment_id">desc<else/>asc</if>');" title="{$Think.lang.sort}">{$Think.lang.numbers}</a>
            <if condition="$sort eq asc_comment_id"><img src="__PUBLIC__/Images/sort_asc.gif"/><else/><img src="__PUBLIC__/Images/sort_desc.gif"/></if></th>
        <th>{$Think.lang.comment_username}</th>
		<th>{$Think.lang.comment_obj}</th>
		<th>{$Think.lang.comment_addtime}</th> 
		<th><a href="javascript:void(0)" onclick="javascript:sortBy('comment_replaynum','<if condition="$sort eq asc_comment_replaynum">desc<else/>asc</if>');" title="{$Think.lang.sort}">{$Think.lang.comment_hit}</a>
		 <if condition="$sort eq asc_comment_replaynum"><img src="__PUBLIC__/Images/sort_asc.gif"/><else/><img src="__PUBLIC__/Images/sort_desc.gif"/></if></th>       	
		<th>{$Think.lang.visible}</th>
		<th>{$Think.lang.remark}</th>
		<th>{$Think.lang.approved}</th>
		<th>{$Think.lang.comment_reply}</th>
		<th>{$Think.lang.handler}</th>
        </tr>
        <volist name="list" id="vo">
          <tr>
            <td style="background-color: rgb(255, 255, 255);" width="7%" align="center"><input type="checkbox" id="key" name="key[]" onclick="openAll()" value="{$vo.comment_id}" />{$vo.comment_id}</td>
            <td style="background-color: rgb(255, 255, 255);" align="center" width="14%"><a href="#" onMouseOver="this.style.color = '#D17E62'; domTT_activate(this, event, 'content', '<b>E-mail: {$vo.comment_email}</b><br /><b>Homepage: {$vo.comment_url}</b><br /><b>IP: {$vo.comment_ip}</b>', 'trail', true, 'fade', 'both', 'fadeMax', 87, 'styleClass', 'niceTitle');" onMouseOut="this.style.color = ''; domTT_mouseout(this, event);">{$vo.comment_author}</a></td>
            <td style="background-color: rgb(255, 255, 255);" align="left" width="27%"><span><neq name='vo.posts_url' value=''><a href="{&blog_domain}index.php/Posts/{$vo.posts_url}/" target="_blank">{$vo.posts_title|msubstr=0,20}</a><else/><a href="{&blog_domain}index.php/Vote/" target="_blank">Polls Archive</a></neq></span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="15%"><span>{$vo.comment_addtime|date='Y-m-d H:i:s',###}</span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="5%"><span>{$vo.comment_replaynum|default='0'}</span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="5%"><span><eq name='vo.comment_visible' value='1'><img src="__PUBLIC__/Images/yes.gif" border="0" height="14" width="14" alt="Yes"><else /><img src="__PUBLIC__/Images/no.gif" border="0" height="14" width="14" alt="No"></eq></span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="5%"><span><eq name='vo.comment_remark' value='1'><img src="__PUBLIC__/Images/yes.gif" border="0" height="14" width="14" alt="Yes"><else /><img src="__PUBLIC__/Images/no.gif" border="0" height="14" width="14" alt="No"></eq></span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="5%"><span><eq name='vo.comment_approved' value='1'><img src="__PUBLIC__/Images/yes.gif" border="0" height="14" width="14" alt="Yes"><else/><img src="__PUBLIC__/Images/no.gif" border="0" height="14" width="14" alt="No"></eq></span></td>
			<td style="background-color: rgb(255, 255, 255);" align="center" width="5%"><span><present name = "vo.comment_reauthor"><img src="__PUBLIC__/Images/yes.gif" border="0" height="14" width="14" alt="Yes"><else /><img src="__PUBLIC__/Images/no.gif" border="0" height="14" width="14" alt="No"></present></span></td>
   
			<td style="background-color: rgb(255, 255, 255);" align="center">
			<a href="__URL__/detailsComment/id/{$vo.comment_id}" title="{$Think.lang.detailscomment}">{$Think.lang.detailscomment}</a> |
			<a href="__APP__/Comment/trashComment/id/{$vo.comment_id}" title="{$Think.lang.trash}" onclick="return confirm('{$Think.lang.confirm}');" >{$Think.lang.trash_}</a></td>    
          </tr>
        </volist>
        <tr>
          <td colspan="2">
		<input type="hidden" name="select" value="do" />
		<select name="act" onchange="changeAction()">
        <option value="">{$Think.lang.please_select}</option>
		<option value="visible">{$Think.lang.visible}</option>
        <option value="remark">{$Think.lang.remark}</option>
        <option value="approved">{$Think.lang.approved}</option>
		<option value="trash">{$Think.lang.trash_}</option>
		</select>
		  <input type="submit" value=" {$Think.lang.submit} " id="btnSubmit" name="btnSubmit" class="button" disabled="true" /></td>
          <td style="background-color: rgb(255, 255, 255);" colspan="8" align="right" nowrap="true"><div class="{$pagestyle}" id="turn-page">{$page}</div></td>
        </tr>
      </tbody>
    </table>
  </div>
<!-- end comment list -->
</form>

<script language="JavaScript">
function confirmSubmit_(frm, ext)
{
	if (frm.elements['act'].value == 'visible')
	{
	  
		return confirm("{$Think.lang.act_visible}");
	  
	}
	else if (frm.elements['act'].value == 'remark')
	{
	  
		return confirm("{$Think.lang.act_remark}");
	  
	}
	else if (frm.elements['act'].value == 'approved')
	{
	  
		return confirm("{$Think.lang.act_approved}");
	  
	}
	else if (frm.elements['act'].value == 'trash')
	{
	  
		return confirm("{$Think.lang.act_trash}");
	  
	}
	else if (frm.elements['act'].value == '')
	{
		return false;
	}
	else
	{
		return true;
	}
}

function changeAction()
{
	var frm = document.forms['listForm'];
	
	if (!document.getElementById('btnSubmit').disabled && confirmSubmit_(frm, false))
	{
		frm.submit();
	}
}
</script>
<include file="Public:pagefooter"/> 